package com.itheima.pinda.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.itheima.pinda.entity.OrderClassifyEntity;
import com.itheima.pinda.mapper.OrderClassifyMapper;
import com.itheima.pinda.service.OrderClassifyService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 订单分类实现类
 *
 * @author llhuang10
 * @date 2021/10/25 21:04
 */
@Slf4j
@Service
public class OrderClassifyServiceImpl extends ServiceImpl<OrderClassifyMapper, OrderClassifyEntity> implements OrderClassifyService {


    @Override
    public List<OrderClassifyEntity> findByJobLogId(String jobLogId) {
        return super.list(Wrappers.<OrderClassifyEntity>lambdaQuery()
                .eq(StringUtils.isNotBlank(jobLogId), OrderClassifyEntity::getJobLogId, jobLogId));
    }
}
